<?
	$image = new Image();

	if($file = upload("image")){

		$_POST["image"] = $file[0];
	}

    $db->insert("gallery", $_POST);

    redirect("index.php");
?>